import request from '@/utils/request'

export function listCompanyGroupTree(data) {
  return request({
    url: '/base/companyBaseGroup/groupTree',
    method: 'get',
    params: data
  })
}

// 查询公司所属组列表
export function listCompanyBaseGroup(query) {
  return request({
    url: '/base/companyBaseGroup/list',
    method: 'get',
    params: query
  })
}

// 查询公司所属组详细
export function getCompanyBaseGroup(id) {
  return request({
    url: '/base/companyBaseGroup/' + id,
    method: 'get'
  })
}

// 保存公司所属组
export function saveCompanyBaseGroup(data) {
  return request({
    url: '/base/companyBaseGroup/save',
    method: 'post',
    data: data
  })
}

// 删除公司所属组
export function delCompanyBaseGroup(id) {
  return request({
    url: '/base/companyBaseGroup/' + id,
    method: 'delete'
  })
}

// 导出公司所属组
export function exportCompanyBaseGroup(query) {
  return request({
    url: '/base/companyBaseGroup/export',
    method: 'get',
    params: query
  })
}

export function updateBaseRemark(data) {
  return request({
    url: '/base/companyBaseGroup/updateBaseRemark',
    method: 'post',
    data: data
  })
}

export function checkOpenBtnStatus() {
  return request({
    url: '/base/companyBaseGroup/checkOpenBtnStatus',
    method: 'get'
  })
}
